import Mock from 'mockjs'
import homeApi from './mockData/home'
import userApi from './mockData/user'
import permissionApi from './mockData/permission'

// mock("1.拦截得路径","2.方法","3.制造得假数据")
// 首页
Mock.mock('/api/home/getTableData', 'get', homeApi.getTableData)
Mock.mock('/api/home/getCountData', 'get', homeApi.getCountData)
Mock.mock('/api/home/getChartData', "get", homeApi.getChartData)

// 用户管理
Mock.mock(/\/user\/getUserData/,"get", userApi.getUserList)
Mock.mock(/\/user\/deleteUser/, "get", userApi.deleteUser)
Mock.mock(/\/user\/addUser/,"post", userApi.createUser)
Mock.mock(/\/user\/editUser/, "post", userApi.updateUser)
// Mock.mock(/\/user\/getUserData/, 'get', (config)=>userApi.getUserList(config))

// 登录
Mock.mock(/\/permission\/getMenu/, "post", permissionApi.getMenu)